#include <QObject>
#include <QSerialPort>
#include <QByteArray>
#include <QMutex>
#include <QLabel>
#ifndef SENDCOUNTUPDATER_H
#define SENDCOUNTUPDATER_H

class SendCountUpdater: public QObject
{
    Q_OBJECT
public:
    explicit SendCountUpdater(QSerialPort *serialPort, QMutex *mutex, QLabel* lbl, QObject *parent = nullptr);
    ~SendCountUpdater();
    void setNumOnLabel(QLabel* lbl, QString strS, long num);
public slots:
    void updateSendCount(int data);
private:
    QSerialPort *m_serialPort;
    QMutex *m_mutex;
    long sendNum;
    QLabel* lblSendNum;
signals:
    void updateLabel(const QString& text);


};

#endif // SENDCOUNTUPDATER_H
